<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /**
         * |
         * []
         */
        // 北京号码
        const reg1 = /(010)\-\d{7}/
        console.log(reg1.test('010-8901234'));

        const reg2 = /[1-5]/
        console.log(reg2.test(123));
        console.log(reg2.test(678));
    </script>
</body>
</html>